<h3><%= t(".title") %></h3>

<p class="lead"><%= t(".description") %></p>

<table class="table table-striped">
  <tr>
    <th colspan="2"><%= Federails::Moderation::Report.human_attribute_name(:object) %></th>
    <th colspan="2"><%= Federails::Moderation::Report.human_attribute_name(:federails_actor) %></th>
    <th><%= Federails::Moderation::Report.human_attribute_name(:created_at) %></th>
    <th></th>
  </tr>
  <% @reports.each do |report|
    next unless report.object %>
    <tr>
      <td><%= Icon icon: icon_for(report.object.entity.class), label: "" %></td>
      <td><%= link_to report.object.entity.name, report.object.entity if report.object&.entity %></td>
      <td>
        <%= Icon icon: report.local? ? "house" : "globe", label: "" %>
      </td>
      <td><%= report.reporter_address %></td>
      <td><%= report.created_at %></td>
      <td><%= link_to safe_join([Icon(icon: "search", label: t("general.view")), t("general.view")], " "), settings_report_path(report), {class: "float-end btn btn-primary"} %></td>
    </tr>
  <% end %>
</table>
